#!python
from binary_helpers import *

""" simple.py
Create a simple binary file
simple.xml and this file must ALWAYS be in sync
"""

FILE = "simple.bin"
MODEL = "simple.xml"
VALUES = [123456, 7890, bstr("hello world", 32), -32, bstr("foobar", 32), 3.14159]

def main():
    """
    Output a simple binary file
    """
    fd = open(FILE, mode='wb') 

    int_to_bin(fd, 123456)
    int_to_bin(fd, 7890)
    string_to_bin(fd, "hello world", 32)
    byte_to_bin(fd, -32)
    string_to_bin(fd, "foobar", 32)
    float_to_bin(fd, 3.14159)

    fd.close()

if __name__ == "__main__":
    main()

